/**
 * Copyright (C) 2010 Alfredo Morresi
 * 
 * This file is part of WebcamHolmes project.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program; If not, see <http://www.gnu.org/licenses/>.
 */

package it.rainbowbreeze.polygen.ui;

import it.rainbowbreeze.libs.common.RainbowLogFacility;
import it.rainbowbreeze.libs.ui.RainbowActivityHelper;
import it.rainbowbreeze.polygen.common.AppEnv;

import java.util.Map;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;

/**
 * Generic helper for activities task
 * 
 * @author Alfredo "Rainbowbreeze" Morresi
 */
public class ActivityHelper
	extends RainbowActivityHelper
{
	//---------- Private fields




	//---------- Constructors
	/**
	 * @param logFacility
	 * @param context
	 */
	public ActivityHelper(RainbowLogFacility logFacility, Context context) {
		super(logFacility, context);
	}

	
	
	
	//---------- Public properties
	public static final String INTENTKEY_SENDLOGREPORT = "SendLogReport";
	
	

	//---------- Public methods
	
	public void openMain(Activity callerActivity, Bundle extras){
		openActivity(callerActivity, MainActivity.class, extras, true, REQUESTCODE_MAINACTIVITY);
	}
	

	@Override
	public void openAbout(
			Activity callerActivity,
			String appName,
			String appVersion,
			String contactEmail) {
		openAbout(callerActivity, AboutActivity.class, appName, appVersion, contactEmail);
	}
	
	
	/**
	 * Open Settings activity
	 * 
	 * @param callerActivity caller activity
	 */
	public void openSettingsMain(Activity callerActivity, boolean mustSendLogReport)
	{
		AppEnv.i(callerActivity);
        openSettingsMain(
				callerActivity,
				mustSendLogReport,
				AppEnv.APP_INTERNAL_NAME,
				AppEnv.APP_INTERNAL_VERSION,
				AppEnv.EMAIL_FOR_ERROR_LOG,
				AppEnv.LOG_TAG);
	}
	
	
	//---------- Protected methods

	//---------- Private methods
	
}
